System.Collections.IList.IndexOf Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Find the first occurrence of an item equal to value in the list, and returns the index of that item.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
private int IList.IndexOf(
	Object value
)
Visual Basic (Declaration)
Private Function System.Collections.IList.IndexOf ( _
	value As Object _
) As Integer Implements IList.IndexOf
Visual C++
private:
virtual int System.Collections.IList.IndexOf (
	Object^ value
) sealed = IList::IndexOf

Parameters

value
Object
The item to search for.

Return Value

The index of value, or -1 if no item in the list compares equal to value.

Remarks

Equality in the list is determined by the default sense of equality for T. If T implements IComparable<T>, the Equals method of that interface is used to determine equality. Otherwise, Object.Equals is used to determine equality.

See Also